package com.example.weather1.vo;

import lombok.Data;

@Data
public class JsonResult {
    private int code;
    private String message;
    private Object data;

    public  JsonResult(int Cid, String message, Object data){
        this.code = Cid;
        this.message = message;
        this.data = data;
    }

    public static JsonResult success(Object data){
        return new JsonResult(10000,"成功",data);
    }

    public static JsonResult failed(String message){
        return new JsonResult(10001,message,null);
    }
}
